<template>
  <el-menu
    default-active="1-4-1"
    class="el-menu-vertical-demo"
    text-color="white"
    background-color="#313743"
  >
    <!-- 顶部logo -->
    <div class="logo">
      <img
        class="img"
        src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fjialishidai.com%2Fuploads%2Fallimg%2F200116%2F161600FB-2.png&refer=http%3A%2F%2Fjialishidai.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1672018978&t=8068bbf6c779fa708f6fd0c090c8a52e"
        alt=""
      />
      <p style="color: #797c80; font-size: 12px">上海正也医药有限公司</p>
    </div>
    <!-- 侧边内容 -->
    <el-submenu :index="v.text" v-for="(v, i) in arr" :key="i">
      <template slot="title">
        <i :class="v.icon"></i>
        <span slot="title" class="span">{{ v.text }}</span>
      </template>
    </el-submenu>
  </el-menu>
</template>

<script>
export default {
  data() {
    return {
      arr: [
        {
          text: "功能功能功能A",
          icon: "el-icon-goods",
        },
        {
          text: "功能功能B",
          icon: "el-icon-folder-remove",
        },
        {
          text: "功能功能C",
          icon: "el-icon-folder-add",
        },
        {
          text: "功能功能功能D",
          icon: "el-icon-folder-opened",
        },
        {
          text: "功能功能功能E",
          icon: "el-icon-folder",
        },
      ],
    };
  },
};
</script>

<style scoped>
.el-menu-vertical-demo {
  width: 200px !important;
  height: 1430px;
  position: absolute !important;
  top: 0;
}

.el-submenu__icon-arrow {
  transform: rotateZ(270deg);
}

.el-submenu {
  width: 200px;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
}

.span {
  width: 100px;
  height: 60px;
  display: inline-block;
  margin: 0px 20px 0 10px;
}

.logo {
  width: 80%;
  height: 60px;
  margin: 0 auto;
}

.img {
  height: 20px;
  margin: 10px 0 3px 0;
}
</style>